Mortify 3D Particle Engine v0.5
Part of the Mortify 3D Engine
Author : Benoit Lemaire
Start of development : 20/12/2000
Last Update : 02/01/2001

(Don't forget to change the lib and include paths, or it won't really work ! ;))

This DX8 Particle Engine, uses the kewl new feature of DirectX8 : Point Sprites. 
Point Sprites are supported very well on some video cards, but not on all. The fact is, in this early version of the engine i don't check for the presence of good caps to support the Point Sprites, so it may work bad on some systems, and even not work at all. But this work of detection will be done in future versions.

This advanced particle engine, is designed with three main classes : 
	- M3D_Particle
	- M3D_ParticleSystem
	- M3D_ParticleManager

The M3D_Particle class define a particle, with all its attributes such as position, oldposition, velocity, size, speed, energy ...
The M3D_ParticleSystem class got mainly virtual methods, because all the different systems (snow, smoke, bubbles ...), are classes which are inheriting of this class, and which redefine most of the methods that belongs to the system.
The M3D_ParticleManager class is used to manage all the particle system : add a system at a given position, remove a system, update all the systems and so on.

Following that design, the Particle Engine is very flexible, and it's as easy as 1+1 to design and add a new Particle System to the engine. We can even think easily to export/import all the systems into dlls, to do kind of a plugin system to let developpers design new effects easily.

If you want to see how it works at the end (to add effects in your engine), just take a look in the file demo.cpp (more precisely, in the method OneTimeSceneInit) ... Just play arrounf with the values, and you'll see what is possible with that pretty well design engine i think !

If you want to add that engine to your dx8 engine, just go ahead. But i guess you'll have to do some hacking to it before :) Yes if it was that easy, where would be the fun part of it ? :p

If you add new effects just let me know, and send them to me at ben023@yahoo.com. I think about doing a dll plugin system so that the effects will be bundle in .dll which is going to be pretty kewl !
Well anyway if this engine help you or if you have questions or anything, just drop me a mail, or contact me by icq : 14261556.

See ya later for more great sources on alrj.org ! :)

Work to do next :
- Work on LOD : When a Particle System get far from the camera, the number of its particles is going down as well as its alpha. Until it reachs a certain max distance, where it's totally disapearing. This way it's much more optimized, and the vertex buffer has less work to handle. 
- Increase/Decrease dynamically the number of particle for a given system, depending of the speed of the  computer.
- Design new effects.
- Build bounding box dynamically for each active system
- Export/Import Particles system within dll.

